<?php

if(isset($_SESSION['login']['ID']))
{
	if(isset($_SESSION['webshop']['ID']))
	{
		if(!isset($_SESSION['menu']['page']))
			$_SESSION['menu']['page'] = 'profiel';
		?>
		<a href="#" onclick="javascript:switchWebshopPage('home'); return false;">Overzicht</a> - 
		<a href="#" onclick="javascript:switchWebshopPage('datafeed'); return false;">Datafeeds</a> - 
		<a href="#" onclick="javascript:switchWebshopPage('products'); return false;">Producten</a> - 
		<a href="#" onclick="javascript:switchWebshopPage('statistics'); return false;">Statestieken</a> - 
		<a href="#" onclick="javascript:switchWebshopPage('profile'); return false;">Profiel</a> - 
		Advertisement
		<script>
			function switchWebshopPage(newpage)
			{
				var url = 'factory/switchWebshopPage.php';
				$.post(
					url, 
					{
						page:newpage
					},
					function(data){
						if(data == 'succes')
						{
							window.location = window.location;
						}
						else
						{
							alert(data);
						}
				});
			}
		</script>
		<?php
	}
	else 
	{
		echo "Overzicht";
	}
}